package databaseConnection;

import java.sql.*;

public class DatabaseConnection {
// Sesuaikan properti jdbcURL dengan basis data anda

    private String jdbcURL = "jdbc:mysql://localhost:3306/rploo_pemesanan_hotel";
    private String user = "root";
    private String password = "1";
    public Connection connection = null;

    /** Creates a new instance of UserConnection */
    public DatabaseConnection() {
        try {
            Class.forName("org.gjt.mm.mysql.Driver");
            connection = DriverManager.getConnection(jdbcURL, user, password);
            System.out.println("koneksi berhasil");
        } catch (Exception ex) {
            System.out.println("message: " + ex.getMessage());
        }
    }

   
    public String getJdbcURL() {
        return jdbcURL;
    }

    public void setJdbcURL(String jdbcURL) {
        this.jdbcURL = jdbcURL;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }


}